const mysql = require('mysql');
const sqlObj={
    host:'localhost',
    user:'root',
    password:"",
    database:"hunli"
}

const client = mysql .createConnection(sqlObj)

let SQLConnect = (sql,arr,callback)=>{
    client.query(sql,arr,(error,result)=>{
        if(error) {
            console.log(error)
            return
        }
        callback(result)
    })
}

 module.exports= SQLConnect